package top.tenebrous.yzl.grpc.proto.sechub;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.43.1)",
    comments = "Source: sechub/sechubService.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class SechubServerGrpc {

  private SechubServerGrpc() {}

  public static final String SERVICE_NAME = "top.tenebrous.yzl.grpc.proto.heatbeat.SechubServer";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest,
      top.tenebrous.yzl.grpc.proto.common.GrpcResponse> getEncryptyMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "encrypty",
      requestType = top.tenebrous.yzl.grpc.proto.sechub.SechubRequest.class,
      responseType = top.tenebrous.yzl.grpc.proto.common.GrpcResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest,
      top.tenebrous.yzl.grpc.proto.common.GrpcResponse> getEncryptyMethod() {
    io.grpc.MethodDescriptor<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest, top.tenebrous.yzl.grpc.proto.common.GrpcResponse> getEncryptyMethod;
    if ((getEncryptyMethod = SechubServerGrpc.getEncryptyMethod) == null) {
      synchronized (SechubServerGrpc.class) {
        if ((getEncryptyMethod = SechubServerGrpc.getEncryptyMethod) == null) {
          SechubServerGrpc.getEncryptyMethod = getEncryptyMethod =
              io.grpc.MethodDescriptor.<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest, top.tenebrous.yzl.grpc.proto.common.GrpcResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "encrypty"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  top.tenebrous.yzl.grpc.proto.sechub.SechubRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  top.tenebrous.yzl.grpc.proto.common.GrpcResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SechubServerMethodDescriptorSupplier("encrypty"))
              .build();
        }
      }
    }
    return getEncryptyMethod;
  }

  private static volatile io.grpc.MethodDescriptor<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest,
      top.tenebrous.yzl.grpc.proto.common.GrpcResponse> getDecryptMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "decrypt",
      requestType = top.tenebrous.yzl.grpc.proto.sechub.SechubRequest.class,
      responseType = top.tenebrous.yzl.grpc.proto.common.GrpcResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest,
      top.tenebrous.yzl.grpc.proto.common.GrpcResponse> getDecryptMethod() {
    io.grpc.MethodDescriptor<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest, top.tenebrous.yzl.grpc.proto.common.GrpcResponse> getDecryptMethod;
    if ((getDecryptMethod = SechubServerGrpc.getDecryptMethod) == null) {
      synchronized (SechubServerGrpc.class) {
        if ((getDecryptMethod = SechubServerGrpc.getDecryptMethod) == null) {
          SechubServerGrpc.getDecryptMethod = getDecryptMethod =
              io.grpc.MethodDescriptor.<top.tenebrous.yzl.grpc.proto.sechub.SechubRequest, top.tenebrous.yzl.grpc.proto.common.GrpcResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "decrypt"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  top.tenebrous.yzl.grpc.proto.sechub.SechubRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  top.tenebrous.yzl.grpc.proto.common.GrpcResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SechubServerMethodDescriptorSupplier("decrypt"))
              .build();
        }
      }
    }
    return getDecryptMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static SechubServerStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SechubServerStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SechubServerStub>() {
        @java.lang.Override
        public SechubServerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SechubServerStub(channel, callOptions);
        }
      };
    return SechubServerStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static SechubServerBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SechubServerBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SechubServerBlockingStub>() {
        @java.lang.Override
        public SechubServerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SechubServerBlockingStub(channel, callOptions);
        }
      };
    return SechubServerBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static SechubServerFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SechubServerFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SechubServerFutureStub>() {
        @java.lang.Override
        public SechubServerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SechubServerFutureStub(channel, callOptions);
        }
      };
    return SechubServerFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class SechubServerImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     * 数据加密
     * </pre>
     */
    public void encrypty(top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request,
        io.grpc.stub.StreamObserver<top.tenebrous.yzl.grpc.proto.common.GrpcResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEncryptyMethod(), responseObserver);
    }

    /**
     * <pre>
     * 数据解密
     * </pre>
     */
    public void decrypt(top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request,
        io.grpc.stub.StreamObserver<top.tenebrous.yzl.grpc.proto.common.GrpcResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDecryptMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getEncryptyMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                top.tenebrous.yzl.grpc.proto.sechub.SechubRequest,
                top.tenebrous.yzl.grpc.proto.common.GrpcResponse>(
                  this, METHODID_ENCRYPTY)))
          .addMethod(
            getDecryptMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                top.tenebrous.yzl.grpc.proto.sechub.SechubRequest,
                top.tenebrous.yzl.grpc.proto.common.GrpcResponse>(
                  this, METHODID_DECRYPT)))
          .build();
    }
  }

  /**
   */
  public static final class SechubServerStub extends io.grpc.stub.AbstractAsyncStub<SechubServerStub> {
    private SechubServerStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SechubServerStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SechubServerStub(channel, callOptions);
    }

    /**
     * <pre>
     * 数据加密
     * </pre>
     */
    public void encrypty(top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request,
        io.grpc.stub.StreamObserver<top.tenebrous.yzl.grpc.proto.common.GrpcResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getEncryptyMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 数据解密
     * </pre>
     */
    public void decrypt(top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request,
        io.grpc.stub.StreamObserver<top.tenebrous.yzl.grpc.proto.common.GrpcResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getDecryptMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class SechubServerBlockingStub extends io.grpc.stub.AbstractBlockingStub<SechubServerBlockingStub> {
    private SechubServerBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SechubServerBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SechubServerBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * 数据加密
     * </pre>
     */
    public top.tenebrous.yzl.grpc.proto.common.GrpcResponse encrypty(top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getEncryptyMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 数据解密
     * </pre>
     */
    public top.tenebrous.yzl.grpc.proto.common.GrpcResponse decrypt(top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getDecryptMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class SechubServerFutureStub extends io.grpc.stub.AbstractFutureStub<SechubServerFutureStub> {
    private SechubServerFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SechubServerFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SechubServerFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * 数据加密
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<top.tenebrous.yzl.grpc.proto.common.GrpcResponse> encrypty(
        top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getEncryptyMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 数据解密
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<top.tenebrous.yzl.grpc.proto.common.GrpcResponse> decrypt(
        top.tenebrous.yzl.grpc.proto.sechub.SechubRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getDecryptMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_ENCRYPTY = 0;
  private static final int METHODID_DECRYPT = 1;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final SechubServerImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(SechubServerImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_ENCRYPTY:
          serviceImpl.encrypty((top.tenebrous.yzl.grpc.proto.sechub.SechubRequest) request,
              (io.grpc.stub.StreamObserver<top.tenebrous.yzl.grpc.proto.common.GrpcResponse>) responseObserver);
          break;
        case METHODID_DECRYPT:
          serviceImpl.decrypt((top.tenebrous.yzl.grpc.proto.sechub.SechubRequest) request,
              (io.grpc.stub.StreamObserver<top.tenebrous.yzl.grpc.proto.common.GrpcResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class SechubServerBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    SechubServerBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return top.tenebrous.yzl.grpc.proto.sechub.SechubServiceGrpc.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("SechubServer");
    }
  }

  private static final class SechubServerFileDescriptorSupplier
      extends SechubServerBaseDescriptorSupplier {
    SechubServerFileDescriptorSupplier() {}
  }

  private static final class SechubServerMethodDescriptorSupplier
      extends SechubServerBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    SechubServerMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (SechubServerGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new SechubServerFileDescriptorSupplier())
              .addMethod(getEncryptyMethod())
              .addMethod(getDecryptMethod())
              .build();
        }
      }
    }
    return result;
  }
}
